# -*- coding: utf-8 -*-
"""
Houzz 配置模块
"""

from .base_settings import (
    REDIS_CONFIG,
    REDIS_DBS,
    PROXY_CONFIG,
    LOG_CONFIG,
    REDIS_KEYS,
    get_redis_key
)

from .houzz_settings import (
    SPIDER_NAME,
    LIST_SCRAPER_CONFIG,
    DETAIL_SCRAPER_CONFIG,
    LIST_PAGE_CONFIG,
    CATEGORIES
)


def get_spider_config(spider_name='houzz'):
    """
    获取爬虫配置
    
    Args:
        spider_name: 爬虫名称（默认为'houzz'）
        
    Returns:
        配置模块
    """
    if spider_name == 'houzz':
        from . import houzz_settings
        return houzz_settings
    else:
        raise ValueError(f"Unknown spider name: {spider_name}. Only 'houzz' is supported in this project.")


__all__ = [
    'REDIS_CONFIG',
    'REDIS_DBS',
    'PROXY_CONFIG',
    'LOG_CONFIG',
    'REDIS_KEYS',
    'get_redis_key',
    'SPIDER_NAME',
    'LIST_SCRAPER_CONFIG',
    'DETAIL_SCRAPER_CONFIG',
    'LIST_PAGE_CONFIG',
    'CATEGORIES',
    'get_spider_config'
]
